﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListContact.ascx.cs"
    Inherits="ServicesDirectory.UserControl.ListContact1" %>
<%@ Register Src="ManagerContact.ascx" TagName="ManagerContact" TagPrefix="uc1" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
       <div id="overlay2" class="web_dialog_overlay"></div>
        <div id="draggable" class="bgPopup">
            <div class="TitleManarer">
                Search Contact
                <asp:Button runat="server" OnClick="CmdClose_Click" CssClass="CloseButtonPopup" ID="btnClose" />
            </div>
            <div class="listContact">
                <div class="spaceManager">
                </div>
                <div class="titleCol1">
                    FirstName:</div>
                <div class="titleCol2">
                    <asp:TextBox runat="server" ID="txtFirstName" Width="99%"></asp:TextBox></div>
                <div class="titleCol1">
                    SurName:</div>
                <div class="titleCol2">
                    <asp:TextBox runat="server" ID="txtSurname" Width="99%"></asp:TextBox>
                </div>
            </div>
            <div class="spaceManager">
            </div>
            <div class="ButonContact">
                <asp:Button runat="server" CausesValidation="False" ID="cmdSearchContact" Text="Search Contact" />
                <asp:Button runat="server" CausesValidation="False" Width="60px" ID="cmdNone" Text="None" />
                <asp:Button runat="server" CausesValidation="False" Width="60px" ID="cmdClear" Text="Clear" />
                <asp:Button runat="server" CausesValidation="False" Width="60px" ID="cmdCreate" Text="Create" />
            </div>
            <div class="spaceManager">
            </div>
            &nbsp;
            <asp:CheckBox runat="server" ID="chkInactive" Text="Include In-Active Contact?" Font-Size="10pt"
                AutoPostBack="True" OnCheckedChanged="Inactive_CheckedChanged" />
            <div class="spaceManager">
            </div>
            <div class="contentGrid">
                <div class="hearderGrid">
                    <div class="ContactHeaderCol0">
                        &nbsp;
                    </div>
                    <div class="ContactHeaderCol1">
                        ContactName</div>
                    <div class="ContactHeaderCol2">
                        Mobile Phone</div>
                    <div class="ContactHeaderCol3">
                        Email</div>
                    <div class="ContactHeaderCol4">
                        IsActive</div>
                </div>
                <asp:Repeater runat="server" ID="rptContacts">
                    <ItemTemplate>
                        <asp:HiddenField runat="server" ID="hdContactId" Value='<%#Eval("ContactID") %>' />
                        <div class="rowGrid">
                            <div class="ContactContentCol0">
                                <asp:RadioButton runat="server" GroupName="ClickOne" ID="rbtSelect" /></div>
                            <div class="ContactContentCol1">
                                <asp:Label ID="Label1" runat="server" ToolTip=' <%#Eval("FirstName")+" "+Eval("SurName") %>'
                                    Text='<%# string.Concat(Eval("FirstName")," ",Eval("SurName")).Length>35?string.Concat(Eval("FirstName")," ",Eval("SurName")).Substring(0,32)+"...":string.Concat(Eval("FirstName")," ",Eval("SurName"))%>'></asp:Label>
                            </div>
                            <div class="ContactContentCol2">
                                <asp:Label ID="Label2" runat="server" ToolTip=' <%#Eval("MobilePhone") %>' Text=' <%#Eval("MobilePhone").ToString().Length>15?Eval("MobilePhone").ToString().Substring(0,12)+"...":Eval("MobilePhone") %>'></asp:Label>
                            </div>
                            <div class="ContactContentCol3">
                                <asp:Label ID="Label3" runat="server" ToolTip='<%#Eval("Email") %>' Text='<%#Eval("Email").ToString().Length>35?Eval("Email").ToString().Substring(0,32)+"...":Eval("Email") %>'></asp:Label>
                            </div>
                            <div class="ContactContentCol4">
                                <asp:Label runat="server" ID="lblIsactive" Text=' <%#Eval("IsActive") %>'></asp:Label></div>
                        </div>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <asp:HiddenField runat="server" ID="hdContactId" Value='<%#Eval("ContactID") %>' />
                        <div class="alterRowGrid">
                            <div class="ContactContentCol0">
                                <asp:RadioButton runat="server" GroupName="ClickOne" ID="rbtSelect" /></div>
                            <div class="ContactContentCol1">
                                <asp:Label ID="Label1" runat="server" ToolTip=' <%#Eval("FirstName")+" "+Eval("SurName") %>'
                                    Text='<%# string.Concat(Eval("FirstName")," ",Eval("SurName")).Length>35?string.Concat(Eval("FirstName")," ",Eval("SurName")).Substring(0,32)+"...":string.Concat(Eval("FirstName")," ",Eval("SurName"))%>'></asp:Label>
                            </div>
                            <div class="ContactContentCol2">
                                <asp:Label ID="Label2" runat="server" ToolTip=' <%#Eval("MobilePhone") %>' Text=' <%#Eval("MobilePhone").ToString().Length>15?Eval("MobilePhone").ToString().Substring(0,12)+"...":Eval("MobilePhone") %>'></asp:Label>
                            </div>
                            <div class="ContactContentCol3">
                                <asp:Label ID="Label3" runat="server" ToolTip='<%#Eval("Email") %>' Text='<%#Eval("Email").ToString().Length>35?Eval("Email").ToString().Substring(0,32)+"...":Eval("Email") %>'></asp:Label>
                            </div>
                            <div class="ContactContentCol4">
                                <asp:Label runat="server" ID="lblIsactive" Text=' <%#Eval("IsActive") %>'></asp:Label></div>
                        </div>
                    </AlternatingItemTemplate>
                </asp:Repeater>
                <asp:Panel runat="server" ID="pnNoRecord" Visible="false" CssClass="alterRowGrid">
                    <center>
                        No record found!</center>
                </asp:Panel>
                <asp:HiddenField runat="server" ID="currentContactId" />
            </div>
            <div class="PagingList">
                <span>
                    <asp:Button runat="server" CausesValidation="False" CssClass="backAllList" ID="cmdBackAll"
                        OnClick="CmdBackAll_Click" />
                </span><span>
                    <asp:Button runat="server" CausesValidation="False" CssClass="backList" ID="cmdBacklist"
                        OnClick="Backlist_Click" /></span> <span style="padding-left: 5px;">Page</span>
                <span style="padding-left: 5px;">
                    <input runat="server" id="txtPageNumber" value="1" style="width: 15px" onblur="IsNumeric(this.value)"
                        type="text" />
                </span><span>of</span> <span>
                    <asp:Label runat="server" Text="1" ID="lblTotalPage"></asp:Label></span> <span>
                        <asp:Button runat="server" CausesValidation="False" CssClass="nextAll" ID="cmdNextAll"
                            OnClick="CmdNextAll_Click" />
                    </span><span>
                        <asp:Button runat="server" CausesValidation="False" CssClass="nextList" ID="cmdNext"
                            OnClick="CmdNext_Click" />
                    </span>
            </div>
            <div class="spaceManager">
            </div>
            <div class="ButonContact">
                <asp:Button runat="server" Width="60px" CausesValidation="False" ID="cmdSelect" Text="Select" />
                <asp:Button runat="server" Width="60px" CausesValidation="False" ID="cmdEdit" Text="Edit" />
                <asp:Button runat="server" Width="60px" CausesValidation="False" ID="cmdClose" Text="Close"
                    OnClick="CmdClose_Click" />
                &nbsp;
                <asp:Label runat="server" CssClass="announce" ID="lblAnnounce" Visible="false"></asp:Label>
            </div>
            <div class="spaceManager">
            </div>
            <asp:Panel runat="server" ID="listEdit" CssClass="web_dialog" Visible="false">
                <uc1:ManagerContact ID="ManagerContact1" runat="server" />
            </asp:Panel>
        </div>
    </ContentTemplate>
</asp:UpdatePanel>
